Star Rating
Description
Example demonstrates a Star Rating control built with using SVG images.
Discussion
This example shows a series of star icons. When a star is clicked, the selected star and all stars to the left of the selected star are highlighted.
The number of selected stars can be read from the ViewBox by calling the {dialog.object}.getValue() method. For example:
var rating = {dialog.object}.getValue('MY_VIEWBOX');
As you can with other Data controls, the {dialog.object}.setValue() method can be used to set the number of selected stars:
{dialog.object}.setValue('MY_VIEWBOX',5);
The Star Rating template example is loaded by clicking the Load Sample ViewBox link on the Home tab of the ViewBox Builder.
To learn more, watch the videos below. In these videos we do a behind-the-scenes walk-through on the sample 'star rating' ViewBox Control.